<?php
	// 加载公共文件
	include_once('./public/config/config.php');
	include_once('./public/config/sql.php');

	// 实例化对象
	$obj = new sql($info);

	// 查询总条数
	$sql = "select count(*) AS aggregate from article";

	$count = $obj->db_select_count($sql);

	$where = 6;

	// sql语句的拼接
	$sql = "select id,img,title,`describe`,browse,slide,praise,intime,state from article order by id desc limit {$where}";

	$articleList = $obj->db_select($sql, true, null, null, null);


	// 排行版热度
	$sql = "select id,img,title,state from article where browse>?";
	$where = 10;
	$heat = $obj->db_select($sql, true, null, null, null, $where);
?>